package stu.day1_day8;

public class LeetCode1518 {
    public int numWaterBottles(int numBottles, int numExchange) {
        int num = numBottles;
        while (numBottles >= numExchange) {
            int x =numBottles/numExchange;
            int y = numBottles%numExchange;
            num += x;
            numBottles =y+x;
        }
        return num;

    }

    public static void main(String[] args) {

    }
}
